#include<bits/stdc++.h>
using namespace std;
int main(){
	int input;
	cin >> input;
	int times = 0;
	while(input!=1){
		if(input%2){
			input = (3*input+1)/2;
		}
		else{
			input/=2;
		}
		times++;
	}
	cout << times;
	return 0;
}
